package a.one.dimensional.array;

/**
 * @author shkstart
 * @date 2022/4/16 - 16:55
 */
public class ArrayTest01 {
    public static void main(String[] args) {
        /*
         * ⑤ 数组元素的默认初始化值
         * 		> 数组元素是整型：0
         * 		> 数组元素是浮点型：0.0
         * 		> 数组元素是char型：0或'\u0000'，而非'0'
         * 		> 数组元素是boolean型：false
         *
         * 		> 数组元素是引用数据类型：null
         */
        //5.数组元素的默认初始化值
        int[] arr = new int[5];
        for (int i = 0; i < arr.length; i++) {
            System.out.println(arr[i]);
        }
        System.out.println("********************");
            byte[] arr1 = new byte[4];
            for (int i = 0; i < arr1.length; i++) {
                System.out.println(arr[i]);
            }

        System.out.println("********************");
        double[] arr2 = new double[4];
        for (int i = 0; i < arr2.length; i++) {
            System.out.println(arr2[i]);
        }

        System.out.println("********************");
       char[] arr3 = new char[2];
        for (int i = 0; i < arr3.length; i++) {
            System.out.println("---------" +arr3[i] + "*******");
        }

        if (arr3[0] == 0 ) {
            System.out.println("喜多川海梦我老婆");
        }

        System.out.println("**********");
        boolean[] arr4 = new boolean[5];
        System.out.println(arr4[0]);


        System.out.println("**********");
        String[] arr5 = new String[5];
        System.out.println(arr5[0]);
        if(arr5[4] == null){
            System.out.println("Love喜多川海梦");
        }
    }
}

